package leetcode.treap;

import org.junit.Test;

/**
 * @author ：zsy
 * @date ：Created 2021/11/13 23:52
 * @description：
 */
public class TreapTest {

    public static void main(String[] args) {
        TreapNode root = new TreapNode(11, 6);
        Treap treap = new Treap(root);
        treap.insert_val(new TreapNode(14, 14));
        treap.insert_val(new TreapNode(7, 13));
        treap.insert_val(new TreapNode(3, 18));
        treap.insert_val(new TreapNode(9, 22));
        treap.insert_val(new TreapNode(16, 26));
        treap.insert_val(new TreapNode(15, 30));
        treap.insert_val(new TreapNode(18, 20));
        treap.insert_val(new TreapNode(17, 12));
        //treap.insert_val(new TreapNode(30));
        treap.queue_order();
        System.out.println("删除节点............");
        treap.del_val(11);
        treap.queue_order();
    }
}
